var t = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
    return typeof t;
} : function(t) {
    return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
};

module.exports = {
    formatDate: function(t, e) {
        if (isNaN(t.getTime())) return "--";
        var r = {
            "M+": t.getMonth() + 1,
            "d+": t.getDate(),
            "h+": t.getHours(),
            "m+": t.getMinutes(),
            "s+": t.getSeconds(),
            "q+": Math.floor((t.getMonth() + 3) / 3),
            S: t.getMilliseconds()
        };
        /(y+)/.test(e) && (e = e.replace(RegExp.$1, (t.getFullYear() + "").substr(4 - RegExp.$1.length)));
        for (var n in r) new RegExp("(" + n + ")").test(e) && (e = e.replace(RegExp.$1, 1 === RegExp.$1.length ? r[n] : ("00" + r[n]).substr(("" + r[n]).length)));
        return e;
    },
    isEmptyObject: function(t) {
        for (var e in t) return !1;
        return !0;
    },
    cmpVersion: function(e, r) {
        if ((void 0 === e ? "undefined" : t(e)) + (void 0 === r ? "undefined" : t(r)) !== "stringstring") return !1;
        for (var n = e.split("."), o = r.split("."), s = 0, i = Math.max(n.length, o.length); s < i; s++) {
            if (n[s] && !o[s] && parseInt(n[s]) > 0 || parseInt(n[s]) > parseInt(o[s])) return 1;
            if (o[s] && !n[s] && parseInt(o[s]) > 0 || parseInt(n[s]) < parseInt(o[s])) return -1;
        }
        return 0;
    }
};